Skip to content

audit: revalidate cross-framework comparisons - #79

Draft
stefan-jansen wants to merge 78 commits into
mainfrom
feat/audit-2026-08-current-cross-framework-comparison-suite
Draft

audit: revalidate cross-framework comparisons#79
stefan-jansen wants to merge 78 commits into
mainfrom
feat/audit-2026-08-current-cross-framework-comparison-suite

Conversation

@stefan-jansen

@stefan-jansen stefan-jansen commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Scope

Revalidate the current comparison suite against VectorBT OSS and Pro, Backtrader, Zipline Reloaded, and LEAN. Correct adapters, profiles, evidence, benchmarks, and publication-facing claims, then retain a clean rerun.

Coordination milestone: audit-2026-08

Current result

  • All 12 required real-strategy and framework pairs pass across four real-data workloads: ETF allocation, CME futures, crypto perpetual funding, and USD-quoted FX allocation.
  • Eight other workload and framework pairs remain explicitly unsupported and receive no parity credit.
  • Every required pair replays the same content-addressed historical market data and frozen model-derived targets in both engines.
  • Fill quantities, prices, and other nonmonetary fields compare at 1e-8. Account monetary values use a $0.01 round-half-even quantum. The largest retained raw monetary gap is $0.00000015, or 0.000015 cents.
  • Transaction costs and position rules are disabled on both sides. The result tests target sizing, order sequencing, fills, cash and margin accounting, applicable funding, and valuation. It does not reproduce each case study's complete production result.
  • Performance evidence contains one isolated warm-up and ten isolated measurements per side for all 12 correctness-passing pairs. Only the engine call is timed.

The separate synthetic convention matrix has 66 required passes and two declared unsupported rows. The corrected 250-asset, 5,040-session stress workload passes for all five framework profiles. These remain secondary diagnostic and scale evidence, not the primary realistic-strategy result.

Material correction

The VectorBT stress adapters previously omitted call_seq, so the native engine used column order while the documented ML4T profile used automatic sequencing. The first divergence occurred at fill 58,324. The corrected adapters pass call_seq="auto"; regression tests cover the setting, and the clean stress rerun passes all five rows.

Retained evidence

  • validation/REAL_STRATEGY_RESULTS.json
  • validation/REAL_STRATEGY_PERFORMANCE.json
  • validation/CORRECTNESS_RESULTS.json
  • validation/LARGE_SCALE_RESULTS.json
  • validation/METHODOLOGY.md

Publication checks reject stale or incomplete evidence by validating engine and adapter digests, the full required and unsupported matrix, negative controls, comparison surfaces, and performance linkage.

Verification

  • Clean correctness rerun from engine commit c4b1a6b3fc4422d50840cde41ffd5d5990f2f17a: 12/12 required pairs pass, 8 unsupported
  • Fresh engine-only benchmark: 1 warm-up and 10 measured processes per side for 12 pairs
  • uv run ruff check src tests validation: passed
  • uv run ruff format --check src tests validation: passed
  • uv run ty check: passed
  • uv run pytest: 2,124 passed, 14 skipped, 87.14% coverage
  • pre-commit run --all-files: passed

Centralize immutable framework versions, artifact identities, environment mappings, and scenario membership. Add a validated cross-repository claim inventory for the library, current chapter notebooks, and publication drafts.

Closes ml4t/backtest-dev#2
Serialize both engine outputs, structured exact checks, runtimes, record counts, framework and Python identity, and content-derived provenance. Validate full candidates, reject stale or dirty evidence, and promote accepted results atomically only after the complete matrix passes.

Closes ml4t/backtest-dev#3
@stefan-jansen stefan-jansen added compatibility: none No known compatibility impact priority: normal Normal planned work status: pending-review Acknowledged and waiting for the stated review point type: maintenance Internal maintenance without user-visible behavior labels Aug 26, 2026
@stefan-jansen

Copy link
Copy Markdown
Contributor Author

Pending maintainer review. The branch and its retained audit worktrees are preserved, and all hosted checks currently pass. Review will resume after the current stable-release qualification so the candidate evidence and dirty audit outputs can be reconciled before this draft is made ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

compatibility: none No known compatibility impact priority: normal Normal planned work status: pending-review Acknowledged and waiting for the stated review point type: maintenance Internal maintenance without user-visible behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant